<%
  submit_label = "Update"
  submit_label = "Create" if @document.new_record?
-%>

<%= error_messages_for :document %>

<div class="form">
  <% form_for(@document, :html => { :multipart => true }) do |f| %>
    <%= render :partial => "data" %>

    <%= hidden_field_tag "document_category_id", @document_category.id %>

    <div class="actions"> <%= f.submit submit_label %> </div>
  <% end %>
</div>
